﻿using System.Windows;
using System.Windows.Threading;

namespace Brjnk.GpxExplorer.UI
{
    public partial class ExceptionWindow : Window
    {
        private DispatcherUnhandledExceptionEventArgs e;

        public ExceptionWindow(DispatcherUnhandledExceptionEventArgs e)
        {
            InitializeComponent();
            this.e = e;
            objectPresenter.Object = e;
        }

        private void Button_Click(object sender, RoutedEventArgs e)
        {
            if (this.e.Exception == null) Clipboard.SetText("null");
            else Clipboard.SetText(this.e.Exception.ToString());
        }

        private void Button_Click_1(object sender, RoutedEventArgs e)
        {
            this.Close();
        }
    }
}